package io.renren.modules.styj1.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.styj1.dao.B12NoiseDao;
import io.renren.modules.styj1.entity.B12NoiseEntity;
import io.renren.modules.styj1.service.B12NoiseService;


@Service("b12NoiseService")
public class B12NoiseServiceImpl extends ServiceImpl<B12NoiseDao, B12NoiseEntity> implements B12NoiseService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        String createby=params.get("createby").toString();
        IPage<B12NoiseEntity> page = this.page(
                new Query<B12NoiseEntity>().getPage(params),
                new QueryWrapper<B12NoiseEntity>().eq("creatby",createby)
        );

        return new PageUtils(page);
    }
    public PageUtils queryPageforDistrict(Map<String, Object> params) {
        String typecode=params.get("typecode").toString();
        System.out.println("typecode is "+typecode+"**********");
        IPage<B12NoiseEntity> page = this.page(
                new Query<B12NoiseEntity>().getPage(params),
                new QueryWrapper<B12NoiseEntity>().like("type_code", typecode)
        );
        return new PageUtils(page);
    }
}
